package com.wzh.project.timer;

import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

/**
 * 定时任务
 * @author wzh
 *
 */
public class MyTimer {
	
	public static void main(String[] args) {
		Timer timer=new Timer();
		Calendar instance = Calendar.getInstance();
		instance.set(Calendar.HOUR_OF_DAY, 23);
//		instance.set(Calendar.YEAR, Calendar.MONDAY, Calendar.DATE, Calendar.HOUR, Calendar.mi);
//		timer.scheduleAtFixedRate(new TimerTask() {
//			
//			@Override
//			public void run() {
//				// TODO Auto-generated method stub
//				System.out.println("Timer 执行了");
//			}
//		}, new Date(), 5*1000);
		timer.schedule(new TimerTask() {
			
			@Override
			public void run() {
				System.out.println("1sssssss");
				
			}
		}, 1000,Long.parseLong("10")*1000);
	}

}
